home *** CD-ROM | disk | FTP | other *** search
-
- Polymer('paper-shadow',{
-
- publish: {
-
- /**
- * The z-depth of this shadow, from 0-5. Setting this property
- * after element creation has no effect. Use `setZ()` instead.
- *
- * @attribute z
- * @type number
- * @default 1
- */
- z: 1,
-
- /**
- * Set this to true to animate the shadow when setting a new
- * `z` value.
- *
- * @attribute animated
- * @type boolean
- * @default false
- */
- animated: false
-
- },
-
- /**
- * Set the z-depth of the shadow. This should be used after element
- * creation instead of setting the z property directly.
- *
- * @method setZ
- * @param {Number} newZ
- */
- setZ: function(newZ) {
- if (this.z !== newZ) {
- this.$['shadow-bottom'].classList.remove('paper-shadow-bottom-z-' + this.z);
- this.$['shadow-bottom'].classList.add('paper-shadow-bottom-z-' + newZ);
- this.$['shadow-top'].classList.remove('paper-shadow-top-z-' + this.z);
- this.$['shadow-top'].classList.add('paper-shadow-top-z-' + newZ);
- this.z = newZ;
- }
- }
-
- });
-